//
//  String+Extension.swift
//  YANAWeibo
//
//  Created by mac on 16/5/22.
//  Copyright © 2016年 itcast. All rights reserved.
//

import Foundation

extension String {
    /**
     将十六进制字符串转换为emoji
     
     - returns: emoji表情
     */
    func changeStrToEmoji() -> String {
        let scanner = NSScanner(string: self)
        var value: UInt32 = 0
        scanner.scanHexInt(&value)
        let result = Character(UnicodeScalar(value))
        return "\(result)"
    }
}